package en

import (
	"github.com/Oudwins/zog/zconst"
)

var Map zconst.LangMap = map[zconst.ZogType]map[zconst.ZogIssueCode]string{
	zconst.TypeString: {
		zconst.NotIssueCode(zconst.IssueCodeLen):             "string must not be exactly {{len}} character(s)",
		zconst.NotIssueCode(zconst.IssueCodeEmail):           "must not be a valid email",
		zconst.NotIssueCode(zconst.IssueCodeUUID):            "must not be a valid UUID",
		zconst.NotIssueCode(zconst.IssueCodeMatch):           "string is invalid",
		zconst.NotIssueCode(zconst.IssueCodeURL):             "must not be a valid URL",
		zconst.NotIssueCode(zconst.IssueCodeHasPrefix):       "string must not start with {{prefix}}",
		zconst.NotIssueCode(zconst.IssueCodeHasSuffix):       "string must not end with {{suffix}}",
		zconst.NotIssueCode(zconst.IssueCodeContains):        "string must not contain {{contained}}",
		zconst.NotIssueCode(zconst.IssueCodeContainsDigit):   "string must not contain any digits",
		zconst.NotIssueCode(zconst.IssueCodeContainsUpper):   "string must not contain any uppercase letters",
		zconst.NotIssueCode(zconst.IssueCodeContainsLower):   "string must not contain any lowercase letters",
		zconst.NotIssueCode(zconst.IssueCodeContainsSpecial): "string must not contain any special character",
		zconst.NotIssueCode(zconst.IssueCodeOneOf):           "string must not be one of {{one_of_options}}",
		zconst.IssueCodeRequired:                             "is required",
		zconst.IssueCodeNotNil:                               "must not be empty",
		zconst.IssueCodeMin:                                  "string must contain at least {{min}} character(s)",
		zconst.IssueCodeMax:                                  "string must contain at most {{max}} character(s)",
		zconst.IssueCodeLen:                                  "string must be exactly {{len}} character(s)",
		zconst.IssueCodeEmail:                                "must be a valid email",
		zconst.IssueCodeUUID:                                 "must be a valid UUID",
		zconst.IssueCodeMatch:                                "string is invalid",
		zconst.IssueCodeURL:                                  "must be a valid URL",
		zconst.IssueCodeIP:                                   "must be a valid {{ip}} address",
		zconst.IssueCodeHasPrefix:                            "string must start with {{prefix}}",
		zconst.IssueCodeHasSuffix:                            "string must end with {{suffix}}",
		zconst.IssueCodeContains:                             "string must contain {{contained}}",
		zconst.IssueCodeContainsDigit:                        "string must contain at least one digit",
		zconst.IssueCodeContainsUpper:                        "string must contain at least one uppercase letter",
		zconst.IssueCodeContainsLower:                        "string must contain at least one lowercase letter",
		zconst.IssueCodeContainsSpecial:                      "string must contain at least one special character",
		zconst.IssueCodeOneOf:                                "string must be one of {{one_of_options}}",
		zconst.IssueCodeFallback:                             "string is invalid",
	},
	zconst.TypeBool: {
		zconst.IssueCodeRequired: "is required",
		zconst.IssueCodeNotNil:   "must not be empty",
		zconst.IssueCodeTrue:     "must be true",
		zconst.IssueCodeEQ:       "must be equal to {{eq}}",
		zconst.IssueCodeFalse:    "must be false",
		zconst.IssueCodeFallback: "value is invalid",
	},
	zconst.TypeNumber: {
		zconst.IssueCodeRequired:                   "is required",
		zconst.IssueCodeNotNil:                     "must not be empty",
		zconst.IssueCodeLTE:                        "number must be less than or equal to {{lte}}",
		zconst.IssueCodeLT:                         "number must be less than {{lt}}",
		zconst.IssueCodeGTE:                        "number must be greater than or equal to {{gte}}",
		zconst.IssueCodeGT:                         "number must be greater than {{gt}}",
		zconst.IssueCodeEQ:                         "number must be equal to {{eq}}",
		zconst.NotIssueCode(zconst.IssueCodeEQ):    "number must not be equal to {{eq}}",
		zconst.IssueCodeOneOf:                      "number must be one of {{one_of_options}}",
		zconst.NotIssueCode(zconst.IssueCodeOneOf): "number must not be one of {{one_of_options}}",
		zconst.IssueCodeFallback:                   "number is invalid",
	},
	zconst.TypeTime: {
		zconst.IssueCodeRequired: "is required",
		zconst.IssueCodeNotNil:   "must not be empty",
		zconst.IssueCodeAfter:    "time must be after {{after}}",
		zconst.IssueCodeBefore:   "time must be before {{before}}",
		zconst.IssueCodeEQ:       "time must be equal to {{eq}}",
		zconst.IssueCodeFallback: "time is invalid",
	},
	zconst.TypeSlice: {
		zconst.IssueCodeRequired:                      "is required",
		zconst.IssueCodeNotNil:                        "must not be empty",
		zconst.IssueCodeMin:                           "slice must contain at least {{min}} items",
		zconst.IssueCodeMax:                           "slice must contain at most {{max}} items",
		zconst.IssueCodeLen:                           "slice must contain exactly {{len}} items",
		zconst.NotIssueCode(zconst.IssueCodeLen):      "slice must not contain exactly {{len}} items",
		zconst.IssueCodeContains:                      "slice must contain {{contained}}",
		zconst.NotIssueCode(zconst.IssueCodeContains): "slice must not contain {{contained}}",
		zconst.IssueCodeFallback:                      "slice is invalid",
	},
	zconst.TypeStruct: {
		zconst.IssueCodeRequired: "is required",
		zconst.IssueCodeNotNil:   "must not be empty",
		zconst.IssueCodeFallback: "struct is invalid",
		// JSON
		zconst.IssueCodeInvalidJSON: "invalid json body",
		// ZHTTP ISSUES
		zconst.IssueCodeZHTTPInvalidForm:  "invalid form data",
		zconst.IssueCodeZHTTPInvalidQuery: "invalid query params",
	},
}
